package org.xyl.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * RAG配置类
 */
@Configuration
@ConfigurationProperties(prefix = "rag")
public class RagConfig {
    private Embedding embedding;
    private Document document;
    private Search search;
    
    public static class Embedding {
        private String model;
        
        public String getModel() {
            return model;
        }
        
        public void setModel(String model) {
            this.model = model;
        }
    }
    
    public static class Document {
        private int chunkSize;
        private int chunkOverlap;
        
        public int getChunkSize() {
            return chunkSize;
        }
        
        public void setChunkSize(int chunkSize) {
            this.chunkSize = chunkSize;
        }
        
        public int getChunkOverlap() {
            return chunkOverlap;
        }
        
        public void setChunkOverlap(int chunkOverlap) {
            this.chunkOverlap = chunkOverlap;
        }
    }
    
    public static class Search {
        private int topK;
        private double similarityThreshold;
        
        public int getTopK() {
            return topK;
        }
        
        public void setTopK(int topK) {
            this.topK = topK;
        }
        
        public double getSimilarityThreshold() {
            return similarityThreshold;
        }
        
        public void setSimilarityThreshold(double similarityThreshold) {
            this.similarityThreshold = similarityThreshold;
        }
    }
    
    // Getters and Setters
    public Embedding getEmbedding() {
        return embedding;
    }
    
    public void setEmbedding(Embedding embedding) {
        this.embedding = embedding;
    }
    
    public Document getDocument() {
        return document;
    }
    
    public void setDocument(Document document) {
        this.document = document;
    }
    
    public Search getSearch() {
        return search;
    }
    
    public void setSearch(Search search) {
        this.search = search;
    }
}